import request from '@/utils/request'

// 查询考试题目列表
export function listQuestion(query) {
  return request({
    url: '/examManage/question/list',
    method: 'get',
    params: query
  })
}

// 查询考试题目详细
export function getQuestion(questionId) {
  return request({
    url: '/examManage/question/' + questionId,
    method: 'get'
  })
}

// 新增考试题目
export function addQuestion(data) {
  return request({
    url: '/examManage/question',
    method: 'post',
    data: data
  })
}

// 修改考试题目
export function updateQuestion(data) {
  return request({
    url: '/examManage/question',
    method: 'put',
    data: data
  })
}

// 删除考试题目
export function delQuestion(questionId) {
  return request({
    url: '/examManage/question/' + questionId,
    method: 'delete'
  })
}
// 根据试卷ID查询考试题目列表
export function listByPaperId(query) {
  return request({
    url: '/examManage/question/listByPaperId',
    method: 'get',
    params: query
  })
}
// 根据排除的试卷ID查询考试题目列表
export function listByExPaperId(query) {
  return request({
    url: '/examManage/question/listByExPaperId',
    method: 'get',
    params: query
  })
}
// 根据排除的试卷ID查询考试题目列表
export function listAllByPaperId(query) {
  return request({
    url: '/examManage/question/listAllByPaperId',
    method: 'get',
    params: query
  })
}